import { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
    {
        path: '/', component: () => import('@/layout/index.vue'), redirect: '/index', children: [
            { path: 'index', component: () => import('@/views/index/index.vue') },
            { path: 'main', component: () => import('@/views/index/main.vue') }
        ]
    },
    {
        path: '/admin', component: () => import('@/layout/admin.vue'), redirect: '/admin/index', meta: { title: '管理中心' }, children: [
            { path: 'index', meta: { title: '控制台' }, component: () => import('@/views/admin/index.vue') },
            { path: 'assort', meta: { title: '导航分类' }, component: () => import('@/views/admin/assort.vue') },
            { path: 'navigation', meta: { title: '导航管理' }, component: () => import('@/views/admin/navigation.vue') },
            { path: 'holidays', meta: { title: '假期数据录入' }, component: () => import('@/views/admin/holidays.vue') },
            { path: 'setting', meta: { title: '系统管理' }, component: () => import('@/views/admin/setting.vue') },
            { path: 'logs', meta: { title: '系统日志' }, component: () => import('@/views/admin/logs.vue') },
        ]
    },
    { path: '/admin/login', component: () => import('@/layout/login.vue') }
]

export default routes